/**
 * @author dumeng
 */
import request from '@/utils/request'
/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

/**
 * 抽奖活动列表
 * @param {*} data
 */
export function drawList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/drawActivity/queryPage',
    method: 'post',
    data
  })
}

/**
 * 新增奖品
 * @param {*} data
 */
export function insertDraw(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/drawActivity/insert',
    method: 'post',
    data
  })
}

/**
 * 编辑奖品
 * @param {*} data
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/drawActivity/update',
    method: 'post',
    data
  })
}
/**
 * 修改活动状态
 * @param {*} data
 */
 export function updateStatus(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/drawActivity/updateStatus',
    method: 'post',
    data
  })
}
/**
 * 奖品删除
 * @param {*} id
 */
export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/drawActivity/deleteById',
    method: 'post',
    data
  })
}
/**
 * 奖品查询-回显
 * @param {*} data
 */
export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/drawActivity/get',
    method: 'post',
    data
  })
}
/**
 * 抽奖活动查询
 * @param {*} query
 */
 export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntable/queryPage',
    method: 'post',
    data
  })
}
